package com.hq.fxh.No5_User.MyModle;

import android.content.Context;
import android.widget.ImageView;

import com.hq.fxh.R;


/**
 * @author 大圣
 * @ClassName AdTypeRecAdapter
 * @Description :
 * @Created 16/6/24
 * @Email qwqe601660957@163.com
 */
public class AdTypeRecAdapter extends BaseRecAdapter<AdType> {

    public AdTypeRecAdapter(Context context) {
        super(context);
        mLayoutResId = R.layout.item_ad_type;
    }

    /**
     * Implement this method and use the helper to adapt the view to the given item.
     *
     * @param helper A fully initialized helper.
     * @param item   The item that needs to be displayed.
     */
    @Override
    protected void convert(BaseViewHolder helper, AdType item) {
        helper.setText(R.id.tvName,item.getName());
        ImageView ivIcon = helper.getView(R.id.ivIcon);
        ivIcon.setImageResource(item.getIcon());
    }
}
